package com.kyleromano.disgaea;

import java.io.IOException;

import android.content.res.AssetManager;
import android.graphics.BitmapFactory;

import com.kyleromano.disgaea.dataType.TileSheet;

public class ImageFactory {
	
	public static TileSheet createTilesheet(AssetManager assets, int width, int height, String path) throws IOException
	{
		return new TileSheet(width, height, BitmapFactory.decodeStream(assets.open(path)));
	}

	public static TileSheet createPortrait(AssetManager assets, int jobParent) throws IOException
	{
		String path="portraits/" + jobParent + ".png";
		//124px X 496px
		return new TileSheet(124, 496, BitmapFactory.decodeStream(assets.open(path)));
	}
	
	public static TileSheet createIcon(AssetManager assets, int jobParent) throws IOException
	{
		String path = "icons/" + jobParent + ".png";
		return new TileSheet(96, 96, BitmapFactory.decodeStream(assets.open(path)));
	}
}
